<?php

Class answers_model extends CI_Model {

    public function __construct() {
        $this->load->database();
    }

    public function getCorrectAnswers($id) {
        $data = $this->db->get_where('answers_detail', array('answer_id' => $id, 'isCorrect' => 'Y'));
        $correctAnswer = $data->row_array();
        $correctAnswer = $correctAnswer['answer'];
        return $correctAnswer;
    }

}

?>
